package com.tiyende.kash.loop.ui.presenter

import com.tiyende.kash.loop.common.CommonPresenter
import com.tiyende.kash.loop.ui.contract.IViewContract
import com.tiyende.kash.loop.utils.helper.TiyendePermissionHelper
import org.json.JSONObject

/**
 * TiyendeCredit
 * @Author wwdeng
 * @CreateTime: 2024/11/28 15:41
 * @Annotation：权限页面
 */
class TiyendePermissionListPresenter(private val iView: IViewContract.ITiyendePermissionListView): CommonPresenter(iView) {

    /**
     * 加载权限声明列表
     */
    fun onTiyendeLoadPermissionList(){
        val list = arrayListOf<JSONObject>()
        val tipsItem = JSONObject()
        tipsItem.put("itemType","itemTips")
        list.add(tipsItem)
        list.add(TiyendePermissionHelper.queryTiyendeMSAGItem())
        list.add(TiyendePermissionHelper.queryTiyendePhoneStateItem())
        list.add(TiyendePermissionHelper.queryTiyendeAPListItem())
        list.add(TiyendePermissionHelper.queryTiyendeCameraItem())
        list.add(TiyendePermissionHelper.queryTiyendePhotoAlbumItem())
        list.add(TiyendePermissionHelper.queryTiyendeAddressBookItem())
        list.add(TiyendePermissionHelper.queryTiyendeStorageItem())
        iView.showTiyendePermissionList(list)
    }
}